package com.wolan;

import redis.clients.jedis.Jedis;

/**
 * Created by fei.chen on 2016/3/30.
 */
public class JedisTest {
    public static void main(String[] args) {
        String host = "172.160.100.118";
        int port = 6379;
        Jedis client = new Jedis(host, port);

        String name = client.hget("book","name");
        System.out.println("name = "+name);

        System.out.println(client.hvals("book"));

        client.hset("book", "test", "1111");
        System.out.println(client.hvals("book"));
        System.out.println(client.hdel("book", "test"));
        System.out.println(client.hvals("book"));

    }
}
